package com.fairytask.ui.item.chat
{
	import flash.display.Sprite;
	
	public class ChatListItem extends Sprite
	{
		
		//数据
		private var _id			:int	=	0;
		
		//俩个组件
		private var _itemBtn:ChatListBtnItem;
		private var _itemCheckBox:ChatListCheckBoxItem;
		
		public function ChatListItem(btnStr:String,btnW:Number,btnH:Number,$id:int,btnItemSkin:String="",checkBoxItemSkin:String="")
		{
			super();
			id	=	$id;
			_itemBtn			= new ChatListBtnItem(btnStr,btnW,btnH,id,btnItemSkin);
			_itemCheckBox 		= new ChatListCheckBoxItem(checkBoxItemSkin,id,btnStr);
			_itemCheckBox.x		=	btnW + 5;
			addChild(itemBtn);
			addChild(itemCheckBox);
		}
		
		public function get itemBtn():ChatListBtnItem
		{
			return _itemBtn;
		}
		
		public function get itemCheckBox():ChatListCheckBoxItem
		{
			return _itemCheckBox;
		}
		public function get id():int
		{
			return _id;
		}
		
		public function set id(value:int):void
		{
			_id = value;
		}
	}
}